onattemptreleasecp

SoftwareShield ClientProtector COM Component > ClientProtector (SSCProtector) Reference > OnAttemptReleaseCP

## OnAttemptReleaseCP

OnAttemptReleaseCP is an event function of the ClientProtector dispatch interface. This event will fire upon StartUp if the license is using the Copy-Protection feature and it has not yet been released for the host machine. Your application can respond to this event by implementing it and subscribing to the event interface, providing a synchronous means for the user to input an Activation Code to release the Copy-Protection (for which you control the user interface).

###### Syntax

void OnAttemptReleaseCP ( BSTR ReleaseCPAuthRequestCode, BSTR * InputActivationCode );

###### Parameters

ReleaseCPAuthRequestCode

[IN] This is a wide string containing the Authorization Request Code corresponding to the first Release Copy Protection Authorization Definition found in the license.

InputActivationCode

[OUT] This is a (pointer to a) wide character string (of any length) that you return to the ClientProtector when responding to this event. It should be set to the Activation Code that will (potentially) release the Copy Protection. Normally, you will collect this code through your user interface from the user.

###### Remarks

OnAttemptReleaseCP is an event function of the ClientProtector dispatch interface. This event will fire upon StartUp if the license is using the Copy-Protection feature and it has not yet been released for the host machine. Your application can respond to this event by implementing it and subscribing to the event interface, providing a synchronous means for the user to release the Copy-Protection (for which you control the user interface).

You do not have to implement this function if you do not wish to, even if you are using Copy-Protection. Releasing the Copy-Protection can just as easily be done outside the scope of the StartUp call. The event handler provides a "first-response" synchronous method for you to query the user about releasing the Copy-Protection.

The ReleaseCPAuthRequestCode will contain the Authorization Request Code corresponding to the first Release Copy Protection Authorization Definition found in the license. You will (probably) provide this to the user along with an explanation of what needs to be done to obtain an Activation Code from you to perform the release.

Your application would then collect an Activation Code from the user and send it back to the ClientProtector in the InputActivationCode parameter. The code will be validated and if successful will release the Copy-Protection for this machine.

See the SoftwareShield ClientProtector Control Flow Charts for more information about where this event fires and how it handles the logic around releasing the Copy-Protection.

###### Return Value

Your event handler does not need to return a value.

###### Function Information

Exposed By Interface: | "ISSCProtector"
Exposed In COM Server Binaries: | "SSCProt.dll" and "SSCProtD.dll"